<?php

namespace app\api\controller\system;

use app\api\controller\Controllers;
use think\Request;

class Feedback extends Controllers
{

    /**
     * 反馈意见
     * @param Request $request
     * @return \think\Response
     */
    public function send( Request $request )
    {
        $uid = $request->userInfo['id'];
        $post = $this->request->only(['image_url', 'opinion'], 'post');
        $this->validate($post, 'app\api\validate\system\Feedback');
        $post['uid'] = $uid;
        return app('feedback_service')->storage($post);
    }

}
